package com.hfjava.practice02;

/**
 * @author Administrator
 * @version V1.0
 * @ProjectName:IntelliJ IDEA
 * @PackageName: com.hfjava.practice02
 * @ClassName: Thread
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @date 2019/12/26 19:18
 * @Copyright 大牛版板所有
 */
public class Thread {
    public static void main(String[] args) throws InterruptedException {
        java.lang.Thread mainThread = java.lang.Thread.currentThread();
        mainThread.setName("main");
        NewThread newThread = new NewThread();
        java.lang.Thread thread = new java.lang.Thread(newThread,"new");
        thread.start();
        for (int i = 0; i < 100; i++) {
            java.lang.Thread.sleep(100);
            System.out.println(mainThread.getName());
        }
    }
}
